package com.conti.mapper.prod;

import com.conti.dto.DownTimeCodeDTO;
import com.conti.dto.LinePageQueryDTO;
import com.conti.dto.LineQueryDTO;
import com.conti.entity.CTAndCustomer;
import com.conti.entity.DowntimeReason;
import com.conti.entity.PartNumber;
import com.conti.vo.LineNoPagingVO;
import com.conti.vo.LineVO;
import com.github.pagehelper.Page;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;


@Mapper

public interface LineMapper {

    /**
     * 产线分页查询
     * @param linePageQueryDTO
     * @return
     */

    Page<LineVO> pageQuery(LinePageQueryDTO linePageQueryDTO);

    /**
     * 产线查询，无需分页
     * @param lineQueryDTO
     * @return
     */
    List<LineNoPagingVO> queryNoPaging(LineQueryDTO lineQueryDTO);


    /**
     * 根据产线查询料号
     * @param line
     * @return
     */
    List<PartNumber> getPartNumberByLine(String line);

    /**
     * 根据部门和产线查询停机原因
     * @param downTimeCodeDTO
     * @return
     */
    List<DowntimeReason> getDowntimeReasonByPartAndLine(DownTimeCodeDTO downTimeCodeDTO);

    /**
     * 查询料号的消费者和CT时间
     * @param partNumber
     * @param equipment
     * @return
     */
    CTAndCustomer getCTAndCustomer(String partNumber, String equipment);
}
